package com.admission.model;

import java.util.List;

import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Lob;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.admission.listener.AuditableEntity;

@Entity
@Table(name = "academy")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Academy extends AuditableEntity {
	private String name;
	private String introduce;// 介绍
	private List<Major> majors;
	private String state; //显示隐藏"1"开启，"0"关闭

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Lob
	@Basic(fetch = FetchType.LAZY)
	public String getIntroduce() {
		return introduce;
	}

	public void setIntroduce(String introduce) {
		this.introduce = introduce;
	}

	@OneToMany(cascade = { CascadeType.ALL },fetch=FetchType.LAZY)
	public List<Major> getMajors() {
		return majors;
	}

	public void setMajors(List<Major> majors) {
		this.majors = majors;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	
    
}
